#if !defined(AFX_CODEHELP_H__822B551A_2947_4E07_BDBF_F5C3B36F6CD1__INCLUDED_)
#define AFX_CODEHELP_H__822B551A_2947_4E07_BDBF_F5C3B36F6CD1__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols
#include "GlobalOption.h"
#include "GlobalSyntex.h"
#include "CHGlobal.h"
#include <afxtempl.h>

/////////////////////////////////////////////////////////////////////////////

#define OPTIONFILE	_T("Option.ini")
#define SYNTEXDIR	_T("Syntex")

/////////////////////////////////////////////////////////////////////////////
// CCodeHelpApp:

class CCodeHelpApp : public CWinApp
{
public:
	BOOL UpdateDataBase();
	BOOL BackupDataBase(const CString& strDstPath);
	BOOL IsOpenDataBase(const CString& strDBFile);
	BOOL CompactDataBase(const CString& strDBFile);
	BOOL CreateDataBase(const CString& strDBFile);
	CCodeHelpApp();

	_RecordsetPtr rset;
	_ConnectionPtr conn;
	CString sAttachmentField;

	BOOL OpenDataBase(const CString& strDBFile);

private:
	BOOL IsUniqueInstance();
	HANDLE hEventForInstance;


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCodeHelpApp)
	public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	//}}AFX_VIRTUAL

// Implementation
	//{{AFX_MSG(CCodeHelpApp)
	afx_msg void OnAppAbout();
	afx_msg void OnViewOption();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////

extern CCodeHelpApp		theApp;
extern CGlobalOption	theOption;
extern CGlobalSyntex	theSyntex;
extern CList<int, int>	theQueue;

/////////////////////////////////////////////////////////////////////////////

#endif // !defined(AFX_CODEHELP_H__822B551A_2947_4E07_BDBF_F5C3B36F6CD1__INCLUDED_)
